// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addCategory POST /api/category/addCategory */
export async function addCategoryUsingPost(
  body: API.AddCategoryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsestring>('/api/category/addCategory', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'JWT': localStorage.getItem('loginUser') || 'manba',
    },
    data: body,
    ...(options || {}),
  });
}

/** getAllCategoryList GET /api/category/getAllCategoryList */
export async function getAllCategoryListUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListCategoryVo>('/api/category/getAllCategoryList', {
    method: 'GET',
    headers: {
      'JWT': localStorage.getItem('loginUser') || 'manba',
    },
    ...(options || {}),
  });
}

/** getCategoryList GET /api/category/getCategoryList */
export async function getCategoryListUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListCategoryVo>('/api/category/getCategoryList', {
    method: 'GET',
    headers: {
      'JWT': localStorage.getItem('loginUser') || 'manba',
    },
    ...(options || {}),
  });
}
